.dx-size-default() {
    @GENERIC_DATAGRID_CELL_PADDING: 7px;
    @GENERIC_DATAGRID_TEXTEDITOR_INPUT_PADDING: 32px;
    @GENERIC_DATAGRID_HEADER_PANEL_MARGIN_BOTTOM: 10px;
    @GENERIC_DATAGRID_HEADER_PANEL_MARGIN_LEFT: 10px;
    @GENERIC_DATAGRID_MENU_ITEM_PADDING: 6px 5px 7px;

    @DATAGRID_COLUMN_CHOOSER_PADDING: 20px;
    @GENERIC_DATAGRID_COLUMN_CHOOSER_DRAG_PADDING: 0px @DATAGRID_COLUMN_CHOOSER_PADDING @DATAGRID_COLUMN_CHOOSER_PADDING @DATAGRID_COLUMN_CHOOSER_PADDING;
    @GENERIC_DATAGRID_COLUMN_CHOOSER_CHECKBOX_PADDING: 0px 10px @DATAGRID_COLUMN_CHOOSER_PADDING 10px;
    @GENERIC_DATAGRID_COLUMN_CHOOSER_ITEM_MARGIN: 10px;

    @GENERIC_DATAGRID_GROUPPANEL_ITEM_MARGIN: 10px;

    @GENERIC_DATAGRID_COMMAND_SELECT_COLUMN_WIDTH: 70px;
    @GENERIC_DATAGRID_COMMAND_EDIT_COLUMN_WIDTH: 85px;
    @GENERIC_DATAGRID_COMMAND_EXPAND_COLUMN_WIDTH: 30px;

    @GENERIC_DATAGRID_CHECKBOX_FONTSIZE: 12px;
}

.dx-size-compact() {
    @GENERIC_DATAGRID_CELL_PADDING: 5px;
    @GENERIC_DATAGRID_TEXTEDITOR_INPUT_PADDING: 24px;
    @GENERIC_DATAGRID_HEADER_PANEL_MARGIN_BOTTOM: 5px;
    @GENERIC_DATAGRID_HEADER_PANEL_MARGIN_LEFT: 5px;
    @GENERIC_DATAGRID_MENU_ITEM_PADDING: 5px 3px 3px;

    @DATAGRID_COLUMN_CHOOSER_PADDING: 10px;
    @GENERIC_DATAGRID_COLUMN_CHOOSER_DRAG_PADDING: 0px @DATAGRID_COLUMN_CHOOSER_PADDING @DATAGRID_COLUMN_CHOOSER_PADDING @DATAGRID_COLUMN_CHOOSER_PADDING;
    @GENERIC_DATAGRID_COLUMN_CHOOSER_CHECKBOX_PADDING: 0px 5px @DATAGRID_COLUMN_CHOOSER_PADDING 5px;
    @GENERIC_DATAGRID_COLUMN_CHOOSER_ITEM_MARGIN: 5px;

    @GENERIC_DATAGRID_GROUPPANEL_ITEM_MARGIN: 5px;

    @GENERIC_DATAGRID_COMMAND_SELECT_COLUMN_WIDTH: 55px;
    @GENERIC_DATAGRID_COMMAND_EDIT_COLUMN_WIDTH: 70px;
    @GENERIC_DATAGRID_COMMAND_EXPAND_COLUMN_WIDTH: 15px;

    @GENERIC_DATAGRID_CHECKBOX_FONTSIZE: 10px;
}

.dx-set-checkbox-border-color-as-background() when (@GENERIC_COLOR_POSTFIX = ".contrast") {
    .dx-selection .dx-checkbox-icon {
        border-color: @DATAGRID_BASE_BACKGROUND_COLOR;
    }
}

@GENERIC_DATAGRID_BORDER: 1px solid @DATAGRID_BORDER_COLOR;
@GENERIC_DATAGRID_BORDER_HIDDEN: 1px solid transparent;
@GENERIC_DATAGRID_DRAG_HEADER_BORDER: 1px solid @datagrid-drag-header-border-color;
@GENERIC_DATAGRID_NODATA_FONT_SIZE: 17px;
@GENERIC_DATAGRID_ROW_BORDER: 1px solid transparent;
@GENERIC_DATAGRID_DRAG_HEADER_FIRST_SHADOW: 0px 0px 1px @datagrid-drag-header-shadow-color;
@GENERIC_DATAGRID_DRAG_HEADER_SECOND_SHADOW: 0px 1px 3px @datagrid-drag-header-second-shadow-color;

.dx-datagrid {
    line-height: inherit;

    &.dx-datagrid-borders {
        > .dx-datagrid-headers, > .dx-datagrid-rowsview, > .dx-datagrid-total-footer {
            border-left: @GENERIC_DATAGRID_BORDER;
            border-right: @GENERIC_DATAGRID_BORDER;
        }

        > .dx-datagrid-rowsview, > .dx-datagrid-total-footer {
            border-bottom: @GENERIC_DATAGRID_BORDER;
        }

        > .dx-datagrid-pager, > .dx-datagrid-headers, > .dx-datagrid-rowsview {
            border-top: @GENERIC_DATAGRID_BORDER;
        }
    }

    .dx-datagrid-group-panel {
        font-size: @GENERIC_BASE_FONT_SIZE;
    }

    .dx-menu {
        background-color: transparent;
        height: 100%;

        .dx-menu-item {
            .dx-menu-item-content {
                padding: @GENERIC_DATAGRID_MENU_ITEM_PADDING;

                .dx-icon {
                    margin: 0px 3px;
                }
            }
        }
    }

    .dx-menu-item-has-submenu {
        &.dx-state-hover {
            background-color: transparent;
        }

        &.dx-menu-item-expanded.dx-state-hover {
            background-color: @datagrid-editor-bg;
        }
    }

    .dx-menu-item-has-icon {
        .dx-icon {
            color: @datagrid-menu-icon-color;
        }
    }

    &.dx-context-menu {
        .dx-menu-items-container {
            .dx-icon-context-menu-sort-asc {
                .dx-icon-sortuptext;
                .dx-icon-sizing(16px);
            }

            .dx-icon-context-menu-sort-desc {
                .dx-icon-sortdowntext;
                .dx-icon-sizing(16px);
            }
        }
    }

    .dx-icon-filter-operation-equals {
        .dx-icon-equal;
    }

    .dx-icon-filter-operation-default {
        .dx-icon-find;
        .dx-icon-sizing(12px);
    }

    .dx-icon-filter-operation-not-equals {
        .dx-icon-notequal;
    }

    .dx-icon-filter-operation-less {
        .dx-icon-less;
    }

    .dx-icon-filter-operation-less-equal {
        .dx-icon-lessorequal;
    }

    .dx-icon-filter-operation-greater {
        .dx-icon-greater;
    }

    .dx-icon-filter-operation-greater-equal {
        .dx-icon-greaterorequal;
    }

    .dx-icon-filter-operation-contains {
        .dx-icon-contains;
    }

    .dx-icon-filter-operation-not-contains {
        .dx-icon-doesnotcontain;
    }

    .dx-icon-filter-operation-starts-with {
        .dx-icon-startswith;
    }

    .dx-icon-filter-operation-ends-with {
        .dx-icon-endswith;
    }

    .dx-menu-items-container .dx-menu-item-has-icon .dx-icon-filter-operation-between {
        background-image: @datagrid-filter-operation-bg;
        background-repeat: no-repeat;
        background-position: center center;
        background-size: 14px 5px;
    }

    .dx-menu-items-container .dx-menu-item-has-icon.dx-menu-item-selected .dx-icon-filter-operation-between {
        background-image: @datagrid-filter-operation-selected-bg;
    }

    .dx-row-alt {
        & > td {
            background-color: @datagrid-row-alternation-bg;
        }

        &.dx-row:not(.dx-row-removed) {
            border-bottom-color: transparent;
        }
    }

    .dx-link {
        color: @datagrid-link-color;
    }

    .dx-checkbox-indeterminate {
        .dx-checkbox-icon:before {
            width: 6px;
            height: 6px;
            left: 4px;
            top: 4px;
        }
    }

    .dx-row-lines > td {
        border-bottom: @GENERIC_DATAGRID_BORDER;
    }

    .dx-column-lines > td {
        border-left: @GENERIC_DATAGRID_BORDER;
        border-right: @GENERIC_DATAGRID_BORDER;
    }

    .dx-error-row {
        td {
            background-color: @datagrid-row-error-bg;
            color: @datagrid-row-error-color;
            padding: @GENERIC_DATAGRID_CELL_PADDING;

            .dx-error-message {
                white-space: normal;
                word-wrap: break-word;
                padding-right: 35px;
            }

            .dx-closebutton {
                float: right;
                margin-top: 2px;
                margin-right: 2px;
                .dx-icon-close;
                .dx-icon-sizing(14px);
            }
        }
    }

    .dx-row > td {
        padding: @GENERIC_DATAGRID_CELL_PADDING;
    }
}

.dx-datagrid-headers, .dx-datagrid-rowsview {
    .dx-texteditor-input {
        padding: @GENERIC_DATAGRID_CELL_PADDING;
        min-height: round(@GENERIC_BASE_LINE_HEIGHT * @GENERIC_BASE_FONT_SIZE) + 2 * @GENERIC_DATAGRID_CELL_PADDING
    }

    .dx-lookup {
        height: auto;
    }

    .dx-lookup-field {
        padding-left: @GENERIC_DATAGRID_CELL_PADDING;
        padding-top: @GENERIC_DATAGRID_CELL_PADDING;
        padding-bottom: @GENERIC_DATAGRID_CELL_PADDING;
    }

    .dx-dropdowneditor-button-visible {
        &.dx-show-clear-button {
            .dx-texteditor-input {
                padding-right: @GENERIC_DROPDOWNEDITOR_BUTTON_WITH_CLEAR_PADDING;
            }

            &.dx-invalid {
                .dx-texteditor-input {
                    padding-right: @GENERIC_DROPDOWNEDITOR_CONTAINER_BUTTON_SIZE + @GENERIC_DROPDOWNEDITOR_INVALID_BADGE_SIZE + @GENERIC_DROPDOWNEDITOR_CLEAR_ICON_CONTAINER_SIZE;
                }

                &.dx-rtl .dx-texteditor-input {
                    padding: @GENERIC_TEXTEDITOR_INPUT_PADDING;
                    padding-left: @GENERIC_DROPDOWNEDITOR_CONTAINER_BUTTON_SIZE + @GENERIC_DROPDOWNEDITOR_INVALID_BADGE_SIZE + @GENERIC_DROPDOWNEDITOR_CLEAR_ICON_CONTAINER_SIZE;
                }
            }
        }

        &.dx-invalid {
            .dx-texteditor-input {
                padding-right: @GENERIC_DROPDOWNEDITOR_CONTAINER_BUTTON_SIZE + @GENERIC_DROPDOWNEDITOR_INVALID_BADGE_SIZE;
            }

            &.dx-rtl .dx-texteditor-input {
                padding: @GENERIC_TEXTEDITOR_INPUT_PADDING;
                padding-left: @GENERIC_DROPDOWNEDITOR_CONTAINER_BUTTON_SIZE + @GENERIC_DROPDOWNEDITOR_INVALID_BADGE_SIZE;
            }
        }

        .dx-texteditor-input {
            padding-right: @GENERIC_DROPDOWNEDITOR_CONTAINER_BUTTON_SIZE;
        }
    }

    .dx-searchbox {
        .dx-texteditor-input,
        .dx-placeholder:before {
            padding-left: @GENERIC_TEXTEDITOR_ICON_CONTAINER_SIZE;

            .dx-rtl &,
            .dx-rtl& {
                padding-right: @GENERIC_TEXTEDITOR_ICON_CONTAINER_SIZE;
            }
        }
    }
}

.dx-editor-cell {
    .dx-numberbox-spin-button {
        background-color: transparent;
    }

    .dx-checkbox {
        &.dx-checkbox-checked {
            .dx-checkbox-icon {
                font-size: @GENERIC_DATAGRID_CHECKBOX_FONTSIZE;
            }
        }
    }

    .dx-texteditor {
        background: @datagrid-editor-bg;

        .dx-texteditor-input {
            background: @datagrid-editor-bg;
        }

        &.dx-numberbox-spin .dx-texteditor-input {
            padding-right: @GENERIC_NUMBERBOX_SPIN_CONTAINER_WIDTH;
        }

        &.dx-numberbox-spin-touch-friendly .dx-texteditor-input {
            padding-right: @GENERIC_NUMBERBOX_TOUCH_FRIENDLY_SPIN_CONTAINER_WIDTH;
        }
    }

    .dx-dropdowneditor {
        background-color: @datagrid-editor-bg;
    }

    &.dx-focused .dx-dropdowneditor-icon {
        border-radius: 0;
    }

    &.dx-editor-inline-block .dx-highlight-outline::before {
        padding-top: @GENERIC_DATAGRID_CELL_PADDING;
        padding-bottom: @GENERIC_DATAGRID_CELL_PADDING;
    }
}

.dx-datagrid-checkbox-size {
    line-height: normal;

    .dx-checkbox-icon {
        height: 16px;
        width: 16px;
    }
}

.dx-device-mobile .dx-datagrid-column-chooser-list,
.dx-datagrid-column-chooser-list {
    .dx-empty-message {
        color: @datagrid-columnchooser-message-color;
        padding: 0 @DATAGRID_COLUMN_CHOOSER_PADDING;
    }
}

.dx-datagrid-column-chooser {
    &.dx-datagrid-column-chooser-mode-drag {
        .dx-popup-content {
            padding: @GENERIC_DATAGRID_COLUMN_CHOOSER_DRAG_PADDING;

            .dx-treeview-node {
                padding-left: 20px;
            }
        }
    }

    &.dx-datagrid-column-chooser-mode-select {
        .dx-popup-content {
            padding: @GENERIC_DATAGRID_COLUMN_CHOOSER_CHECKBOX_PADDING;
        }
    }

    .dx-overlay-content {
        background-color: @datagrid-columnchooser-bg;
        .border-radius(@datagrid-columnchooser-overlay-border-radius);
        .box-shadow(0px 1px 3px @datagrid-columnchooser-shadow-color);

        .dx-popup-title {
            padding-top: 7px;
            padding-bottom: 9px;
            background-color: transparent;
        }

        .dx-popup-content {
            .dx-column-chooser-item {
                margin-bottom: @GENERIC_DATAGRID_COLUMN_CHOOSER_ITEM_MARGIN;
                background-color: @datagrid-columnchooser-item-bg;
                color: @datagrid-columnchooser-item-color;
                font-weight: @datagrid-columnchooser-font-weight;
                border: @GENERIC_DATAGRID_BORDER;
                padding: @GENERIC_DATAGRID_CELL_PADDING;
                .box-shadow(0px 1px 3px -1px @datagrid-columnchooser-shadow-color);
            }
        }
    }
}

.dx-datagrid-drag-header {
    .box-shadow(@GENERIC_DATAGRID_DRAG_HEADER_FIRST_SHADOW, @GENERIC_DATAGRID_DRAG_HEADER_SECOND_SHADOW);
    color: @datagrid-columnchooser-item-color;
    font-weight: @datagrid-columnchooser-font-weight;
    padding: @GENERIC_DATAGRID_CELL_PADDING;
    border: @GENERIC_DATAGRID_DRAG_HEADER_BORDER;
    background-color: @datagrid-header-drag-bg;
}

.dx-datagrid-columns-separator {
    background-color: @datagrid-column-separator-bg;
}

.dx-datagrid-columns-separator-transparent {
    background-color: transparent;
}

.dx-datagrid-drop-highlight {
    & > td {
        background-color: @datagrid-drop-highlight-bg;
        color: @datagrid-drop-highlight-color;
    }
}

.dx-datagrid-focus-overlay {
    border: 2px solid @datagrid-focused-border-color;
}

.dx-data-row.dx-state-hover {
    &:not(.dx-selection):not(.dx-row-inserted):not(.dx-row-removed):not(.dx-edit-row) {
        & > td:not(.dx-focused) {
            background-color: @datagrid-hover-bg;
            color: @datagrid-row-hovered-color;

            &.dx-datagrid-group-space {
                border-right-color: @datagrid-hover-bg;
            }
        }

        & > .dx-datagrid-readonly .dx-texteditor {
            .dx-texteditor-input {
                background-color: @datagrid-hover-bg;
                color: @datagrid-row-hovered-color;
            }
        }

        & > td.dx-pointer-events-none {
            background-color: transparent;
        }
    }
}

.dx-datagrid-table {
    .dx-row {
        .dx-command-select {
            width: @GENERIC_DATAGRID_COMMAND_SELECT_COLUMN_WIDTH;
            min-width: @GENERIC_DATAGRID_COMMAND_SELECT_COLUMN_WIDTH;
        }

        .dx-command-edit {
            width: @GENERIC_DATAGRID_COMMAND_EDIT_COLUMN_WIDTH;
            min-width: @GENERIC_DATAGRID_COMMAND_EDIT_COLUMN_WIDTH;
        }

        .dx-command-expand {
            width: @GENERIC_DATAGRID_COMMAND_EXPAND_COLUMN_WIDTH;
            min-width: @GENERIC_DATAGRID_COMMAND_EXPAND_COLUMN_WIDTH;
        }
    }
}

.dx-datagrid-headers {
    color: @datagrid-columnchooser-item-color;
    font-weight: @datagrid-columnchooser-font-weight;
    .touch-action(pinch-zoom);

    .dx-datagrid-table {
        .dx-datagrid-borders & {
            border-bottom-width: 1px;
        }

        .dx-row > td {
            border-bottom: @GENERIC_DATAGRID_BORDER;
        }
    }
}

.dx-datagrid-filter-row {
    .dx-menu {
        .dx-overlay-content {
            color: @menu-color;
        }
    }

    .dx-menu-item {
        &.dx-state-focused {
            background-color: transparent;

            &:after {
                border: 2px solid @datagrid-focused-border-color;
            }

            &.dx-menu-item-expanded {
                background-color: @DATAGRID_BASE_BACKGROUND_COLOR;

                &:after {
                    border-color: transparent;
                }
            }
        }
    }

    .dx-highlight-outline {
        &::after {
            border-color: @datagrid-cell-modified-border-color;
        }
    }

    .dx-menu-item-content {
        .dx-icon {
            color: @datagrid-menu-icon-color;
        }
    }

    td .dx-editor-container .dx-filter-range-content {
        padding: @GENERIC_DATAGRID_CELL_PADDING @GENERIC_DATAGRID_CELL_PADDING @GENERIC_DATAGRID_CELL_PADDING @GENERIC_DATAGRID_TEXTEDITOR_INPUT_PADDING;
    }
}

.dx-datagrid-filter-range-overlay {
    .dx-overlay-content {
        border: @GENERIC_DATAGRID_BORDER;
        overflow: inherit;
        .box-shadow(2px 2px 3px @datagrid-overlay-content-shadow-color);

        .dx-editor-container.dx-highlight-outline::after {
            border-color: @datagrid-cell-modified-border-color;
            left: 0px;
        }

        .dx-texteditor {
            .dx-texteditor-input {
                background-color: @DATAGRID_BASE_BACKGROUND_COLOR;
                padding: @GENERIC_DATAGRID_CELL_PADDING;
            }

            &.dx-state-focused:after {
                border: 2px solid @datagrid-focused-border-color;
            }
        }
    }
}

&.dx-filter-menu {
    .dx-menu-item-content {
        .dx-icon.dx-icon-filter-operation-default {
            margin-top: 2px;
        }
    }
}

.dx-editor-with-menu .dx-filter-menu {
    .dx-menu-item-content {
        .dx-icon.dx-icon-filter-operation-default {
            margin-top: 2px;
        }
    }
}

.dx-highlight-outline {
    padding: @GENERIC_DATAGRID_CELL_PADDING;
}

.dx-datagrid-header-panel {
    border-bottom: @GENERIC_DATAGRID_BORDER;

    .dx-toolbar {
        margin-bottom: @GENERIC_DATAGRID_HEADER_PANEL_MARGIN_BOTTOM;
    }

    .dx-apply-button {
        .dx-button-styling-variant( @button-success-bg, @button-success-border-color, @button-success-color, @button-success-hover-bg, @button-success-hover-border-color, @button-success-focused-bg, @button-success-focused-border-color, @button-success-active-bg, @button-success-active-border-color, @button-success-color, @button-success-icon-color );
    }
}

.dx-datagrid-button(@icon) {
    background: @icon;
    background-position: center;
    background-size: 100%;
}

.dx-icon-column-chooser {
    .dx-icon-columnchooser;
    .dx-icon-sizing(@GENERIC_BASE_ICON_SIZE);
}

.dx-datagrid-addrow-button {
    .dx-icon-edit-button-addrow {
        .dx-icon-add;
        .dx-icon-sizing(@GENERIC_BASE_ICON_SIZE);
    }
}

.dx-datagrid-cancel-button {
    .dx-icon-edit-button-cancel {
        .dx-icon-revert;
        .dx-icon-sizing(@GENERIC_BASE_ICON_SIZE);
    }
}

.dx-datagrid-save-button {
    .dx-icon-edit-button-save {
        .dx-icon-save;
        .dx-icon-sizing(@GENERIC_BASE_ICON_SIZE);
    }
}

.dx-apply-button {
    .dx-icon-apply-filter {
        .dx-icon-filter;
        .dx-icon-sizing(@GENERIC_BASE_ICON_SIZE);
    }
}

.dx-datagrid-export-button {
    .dx-icon-export-to {
        .dx-icon-export;
        .dx-icon-sizing(@GENERIC_BASE_ICON_SIZE);
    }

    .dx-icon-export-excel-button {
        .dx-icon-exportxlsx;
        .dx-icon-sizing(@GENERIC_BASE_ICON_SIZE);
    }
}

.dx-datagrid-adaptive-more {
    .dx-icon-sizing(@GENERIC_BASE_MORE_ADAPTIVE_ICON_SIZE);
}

.dx-datagrid-group-panel {
    .touch-action(pinch-zoom);

    .dx-group-panel-message {
        color: @datagrid-columnchooser-item-color;
        font-weight: @datagrid-columnchooser-font-weight;
        padding: @GENERIC_DATAGRID_CELL_PADDING;
        border-top: @GENERIC_DATAGRID_BORDER_HIDDEN;
        border-bottom: @GENERIC_DATAGRID_BORDER_HIDDEN;
    }

    .dx-group-panel-item {
        margin-right: @GENERIC_DATAGRID_GROUPPANEL_ITEM_MARGIN;
        color: @datagrid-columnchooser-item-color;
        font-weight: @datagrid-columnchooser-font-weight;
        border: @GENERIC_DATAGRID_BORDER;
        padding: @GENERIC_DATAGRID_CELL_PADDING;
    }

    .dx-block-separator {
        margin-right: @GENERIC_DATAGRID_GROUPPANEL_ITEM_MARGIN;
        color: @datagrid-columnchooser-item-color;
        font-weight: @datagrid-columnchooser-font-weight;
        padding: @GENERIC_DATAGRID_CELL_PADDING + 1;
        background-color: @datagrid-block-separator-bg;
    }

    .dx-sort {
        color: @datagrid-menu-icon-color;
    }
}

.dx-datagrid-rowsview {
    border-top: @GENERIC_DATAGRID_BORDER;

    .dx-row.dx-group-row:first-child {
        border-top: none;
    }

    .dx-row {
        border-top: @GENERIC_DATAGRID_ROW_BORDER;
        border-bottom: @GENERIC_DATAGRID_ROW_BORDER;

        &.dx-edit-row:first-child > td {
            border-top-width: 0px;
            border-bottom: @GENERIC_DATAGRID_BORDER;
        }

        &.dx-edit-row > td {
            border-top: @GENERIC_DATAGRID_BORDER;
            border-bottom: @GENERIC_DATAGRID_BORDER;
        }
    }

    .dx-master-detail-row {
        > .dx-datagrid-group-space, .dx-master-detail-cell {
            border-top: @GENERIC_DATAGRID_BORDER;
            border-bottom: @GENERIC_DATAGRID_BORDER;
        }
    }

        .dx-master-detail-row:not(.dx-datagrid-edit-form) {
            > .dx-datagrid-group-space, .dx-master-detail-cell {
                background-color: @datagrid-master-detail-cell-bg;
            }
        }

    .dx-data-row {
        .dx-validator.dx-datagrid-invalid {
            .dx-highlight-outline::after {
                border: 1px solid @datagrid-row-invalid-faded-border-color;
            }

            &.dx-focused > .dx-highlight-outline::after {
                border: 1px solid @datagrid-row-invalid-border-color;
            }
        }

        .dx-invalid-message {
            .dx-overlay-content {
                padding: 9px 17px 9px;
            }
        }

        .dx-cell-modified {
            .dx-highlight-outline {
                &::after {
                    border-color: @datagrid-cell-modified-border-color;
                }
            }
        }
    }

    .dx-row-removed > td {
        background-color: @datagrid-row-removed-bg;
        border-top: 1px solid @datagrid-cell-modified-border-color;
        border-bottom: 1px solid @datagrid-cell-modified-border-color;
    }

    .dx-row.dx-group-row {
        color: @datagrid-group-row-color;
        background-color: @datagrid-group-row-bg;
        font-weight: bold;

        td {
            border-top-color: @DATAGRID_BORDER_COLOR;
            border-bottom-color: @DATAGRID_BORDER_COLOR;
        }
    }

    .dx-set-checkbox-border-color-as-background();

    .dx-adaptive-detail-row {
        .dx-adaptive-item-text {
            padding-top: @GENERIC_DATAGRID_ADAPTIVE_TEXT_PADDING;
            padding-bottom: @GENERIC_DATAGRID_ADAPTIVE_TEXT_PADDING;
            padding-left: @GENERIC_DATAGRID_ADAPTIVE_TEXT_PADDING;
        }

        .dx-datagrid-invalid {
            border: 1px solid @datagrid-row-invalid-faded-border-color;

            &.dx-adaptive-item-text {
                padding-top: @GENERIC_DATAGRID_ADAPTIVE_TEXT_PADDING - 1px;
                padding-bottom: @GENERIC_DATAGRID_ADAPTIVE_TEXT_PADDING - 1px;
                padding-left: @GENERIC_DATAGRID_ADAPTIVE_TEXT_PADDING - 1px;
            }
        }
    }

    .dx-item-modified {
        .border-radius(@base-border-radius);
        border: 2px solid @datagrid-cell-modified-border-color;

        &.dx-adaptive-item-text {
            padding-top: @GENERIC_DATAGRID_ADAPTIVE_TEXT_PADDING - 2px;
            padding-bottom: @GENERIC_DATAGRID_ADAPTIVE_TEXT_PADDING - 2px;
            padding-left: @GENERIC_DATAGRID_ADAPTIVE_TEXT_PADDING - 2px;
        }
    }

    .dx-selection.dx-row,
    .dx-selection.dx-row:hover {
        & > td {
            background-color: @datagrid-selection-bg;
            color: @datagrid-row-selected-color;

            &.dx-datagrid-group-space {
                border-right-color: @datagrid-selection-bg;
            }

            &.dx-pointer-events-none {
                border-left-color: @datagrid-row-selected-border-color;
                border-right-color: @datagrid-row-selected-border-color;
            }
        }

            & > td.dx-focused {
                background-color: @DATAGRID_BASE_BACKGROUND_COLOR;
                color: @DATAGRID_BASE_COLOR;
            }

        &:not(.dx-row-lines) > td {
            border-bottom: 1px solid @datagrid-selection-bg;
            border-top: 1px solid @datagrid-selection-bg;
        }

        &.dx-column-lines > td {
            border-left-color: @datagrid-row-selected-border-color;
            border-right-color: @datagrid-row-selected-border-color;
        }

        &.dx-row-lines > td {
            border-bottom-color: @datagrid-row-selected-border-color;
        }
    }

    &.dx-scrollable-scrollbars-alwaysvisible.dx-scrollable-both .dx-scrollable-content {
        padding-right: 0;
    }
}

.dx-datagrid-group-opened {
    .dx-icon-spindown;
    .dx-icon-sizing(@GENERIC_BASE_ICON_SIZE);
    color: @datagrid-spin-icon-color;
}

.dx-datagrid-group-closed {
    .dx-icon-spinright;
    .dx-icon-sizing(@GENERIC_BASE_ICON_SIZE);
    color: @datagrid-spin-icon-color;
}

.dx-datagrid-group-opened, .dx-datagrid-group-closed {
    width: 100%;
}

.dx-datagrid-search-text {
    color: @datagrid-search-color;
    background-color: @datagrid-search-bg;
}

.dx-datagrid-nodata {
    color: @datagrid-nodata-color;
    font-size: @GENERIC_DATAGRID_NODATA_FONT_SIZE;
}

.dx-datagrid-bottom-load-panel {
    border-top: @GENERIC_DATAGRID_BORDER;
}

.dx-datagrid-pager {
    border-top: 3px double @DATAGRID_BORDER_COLOR;

    &.dx-widget {
        color: @DATAGRID_BASE_COLOR;
    }
}

.dx-datagrid-summary-item {
    color: @datagrid-summary-color;
}

.dx-datagrid-total-footer {
    border-top: @GENERIC_DATAGRID_BORDER;
}

.dx-row.dx-datagrid-group-footer {
    &.dx-column-lines {
        border-bottom: @GENERIC_DATAGRID_BORDER;
    }

    & > td {
        background-color: @datagrid-summary-bg;
        border-top: @GENERIC_DATAGRID_BORDER;
        border-left-width: 0;
        border-right-width: 0;
    }
}



.dx-datagrid-revert-tooltip {
    .dx-overlay-content {
        background-color: @DATAGRID_BASE_BACKGROUND_COLOR;
        min-width: inherit;
    }

    .dx-revert-button {
        margin: 0px 1px;
        margin-left: 1px;
        .dx-button-styling-variant( @button-danger-bg, @button-danger-border-color, @button-danger-color, @button-danger-hover-bg, @button-danger-hover-border-color, @button-danger-focused-bg, @button-danger-focused-border-color, @button-danger-active-bg, @button-danger-active-border-color, @button-danger-color, @button-danger-icon-color );
        > .dx-button-content {
            padding: @GENERIC_DATAGRID_CELL_PADDING - 1;
        }


    }
}

.dx-toolbar-menu-section {
    .dx-datagrid-checkbox-size {
        width: 100%;

        .dx-checkbox-container {
            padding: 14px;
        }

        .dx-checkbox-text {
            padding-left: 34px;
        }
    }
}

.dx-rtl {
    .dx-toolbar-menu-section {
        .dx-checkbox-text {
            padding-right: 34px;
            padding-left: 27px;
        }
    }


    .dx-data-row.dx-state-hover {
        &:not(.dx-selection):not(.dx-row-inserted):not(.dx-row-removed):not(.dx-edit-row) {
            & > td:not(.dx-focused) {
                &.dx-datagrid-group-space {
                    border-left-color: @datagrid-hover-bg;
                    border-right-color: transparent;
                }
            }
        }
    }

    .dx-datagrid {
        .dx-menu {
            .dx-menu-item-has-submenu.dx-menu-item-has-icon {
                .dx-icon {
                    margin: 0px 3px;
                }
            }
        }

        .dx-datagrid-filter-row td .dx-editor-container .dx-filter-range-content {
            padding: @GENERIC_DATAGRID_CELL_PADDING @GENERIC_DATAGRID_TEXTEDITOR_INPUT_PADDING @GENERIC_DATAGRID_CELL_PADDING @GENERIC_DATAGRID_CELL_PADDING;
        }
    }

    .dx-datagrid-rowsview {
        .dx-selection.dx-row, .dx-selection.dx-row:hover {
            & > td:not(.dx-focused) {
                &.dx-datagrid-group-space {
                    border-left-color: @datagrid-selection-bg;
                }
            }

            & > td {
                border-right-color: @datagrid-row-selected-border-color;

                &.dx-pointer-events-none {
                    border-left-color: @datagrid-row-selected-border-color;
                }
            }
        }

        &.dx-scrollable-scrollbars-alwaysvisible.dx-scrollable-both .dx-scrollable-content {
            padding-left: 0;
        }
    }

    .dx-datagrid-group-panel {
        .dx-group-panel-item, .dx-block-separator {
            margin-left: @GENERIC_DATAGRID_GROUPPANEL_ITEM_MARGIN;
        }
    }
}

.dx-datagrid-table-fixed {
    .dx-row.dx-group-row {
        td {
            background-color: @datagrid-group-row-bg;
        }
    }
}
